CREATE DATABASE Bank;
GO
USE Bank;
GO
CREATE TABLE Account(
    AID INT PRIMARY KEY IDENTITY(1,1),
    OwnerName VARCHAR(50) NOT NULL CONSTRAINT U_OwnerName UNIQUE,
    CreatedDate DATETIME NOT NULL,
    Balance MONEY NOT NULL
);
GO
CREATE TABLE MoneyTransferLog(
    LID INT PRIMARY KEY IDENTITY(1,1),
    SenderAccount INT NOT NULL REFERENCES Account(AID),
    ReceiverAccount INT NOT NULL REFERENCES Account(AID),
    TransferDate DATETIME NOT NULL,
    Amount MONEY NOT NULL,
    Details VARCHAR(50)
);
GO
INSERT INTO Account VALUES('Tom','2001-10-31 00:00:00',100);
INSERT INTO Account VALUES('John','2004-06-20 00:00:00',200);